﻿@model System.Collections.Generic.List<MsForgeReboot.Framework.ViewModels.SectionListViewModel>
@foreach (var item in Model) {
    //string route = ViewContext.RouteData.Values["id"] as string;
    //string c = (!String.IsNullOrEmpty(route) && route == item.Id.ToString()) ? "class=active" : null;
    string route = Request.Url.AbsolutePath;

    string activeClass = route.StartsWith(item.Url) ? "class=active" : null;
    
    <li @activeClass><a href="@item.Url">@item.Title</a></li>
}
  @*@if (Roles.IsUserInRole("Administrators")) { 
    *@<li>@Html.ActionLink("Control Panel", "Index", "Home", new { area = "ControlPanel" }, null)</li>
@*}*@
